#include<iostream>
using namespace std;
int n;
int arr[205][205];
int main()
{
	cin >> n;
	int k = 1;
	int x;
	int i = 1;
	int j = 1;
	char ch = 0;
	int sum = 0;
	while (cin>>x) {
		sum += x;
		if (x <= n * n) {
			for (; i <= n; i++) {
				for (; j <= n; j++) {
					k = 1 - k;
					for (int q = 0; q < x; q++) {
						arr[i][j++] = k;
						if (j == n) {
							i++;
						}
					}
				}
			}
		}
		else {
			return 0;
		}
	}
	for (int a = 1; a <= n; a++) {
		for (int b = 1; b <= n; b++) {
			cout << arr[i][j];
		}
		cout << endl;
	}
	return 0;
}